package com.qf.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class R<T> {
    private Integer code;
    private String msg;
    private T data;

    public static <T> R<T> ok(T obj){
        return new R<T>(0,"操作成功",obj);
    }
    public static <T> R<T> fail(T obj){
        return new R<T>(1,"操作失败",obj);
    }
}
